<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>My JSP 'share.jsp' starting page</title>
		<style type="text/css" title="currentStyle">
@import "/FileBackup/css/demo_page.css";

@import "/FileBackup/css/demo_table.css";
</style>
		<script type="text/javascript" src="/FileBackup/js/jquery.js">
</script>
		<script type="text/javascript"
			src="/FileBackup/js/jquery.dataTables.js">
</script>
		<script type="text/javascript">
$(document).ready(function() {
	var aSelected = [];
	var datatables = null;
	var datatables = $('#example').dataTable( {
		'bPaginate' : true,
		"bProcessing" : true,
		'bLengthChange' : true,
		'sPaginationType' : 'full_numbers',
		"sAjaxSource" : 'initialShareAction.action',
		"oLanguage" : {
			"sProcessing" : "正在加载数据...",
			'sSearch' : '数据筛选:',
			"sLengthMenu" : "每页显示 _MENU_ 项记录",
			"sZeroRecords" : "没有符合项件的数据...",
			"sInfo" : "当前数据为从第 _START_ 到第 _END_ 项数据；总共有 _TOTAL_ 项记录",
			"sInfoEmpty" : "显示 0 至 0 共 0 项",
			"sInfoFiltered" : "(_MAX_)"
		},

		"aoColumns" : [

		{
			"mDataProp" : "name"
		}, {
			"mDataProp" : "kind"
		}, {
			"mDataProp" : "id",
			"bSearchable" : false,
			"bVisible" : false
		}, {
			"mDataProp" : "upperId",
			"bSearchable" : false,
			"bVisible" : false
		} ],
		"fnRowCallback" : function(nRow, aData, iDisplayIndex) {
			if (jQuery.inArray(aData.id, aSelected) != -1) {

				$(nRow).addClass('row_selected');
			}
		}
	});
	$('#example tbody tr').live('click', function() {
		var aData = datatables.fnGetData(this);
		var url = 'getSubFileAction.action?upperId=' + aData.id;
		var params = {};
		jQuery.post(url, params, callbackFun, 'json');

	});
	function callbackFun(data) {
		datatables.fnClearTable();
		datatables.fnAddData(eval(data))
	}
});
function showlightbox(ShowUrl) {
	document.getElementById('lightbox-content').style.display = 'block';
	document.getElementById('lightbox-bg').style.display = 'block';
	if (ShowUrl != '') {
		document.getElementById('lightbox-iframe').src = ShowUrl;
	}
}
function closelightbox() {
	document.getElementById('lightbox-content').style.display = 'none';
	document.getElementById('lightbox-bg').style.display = 'none';
	document.getElementById('lightbox-iframe').src = 'about:blank';
}
</script>
		<style>
#lightbox-content {
	position: absolute;
	height: 350px;
	width: 720px;
	margin: -250px 0px 0px -250px;
	top: 50%;
	left: 30%;
	text-align: center;
	background-color: #FFF;
	border: 1px solid #000;
	display: none;
	z-index: 100;
	overflow: hidden;
	padding: 10px 10px 40px 10px;
}

#lightbox-content p {
	margin-top: 8px;
}

#lightbox-bg {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 90;
	background: #000;
	display: none;
	width: 100%;
	height: 100%;
	_height: 2000px;
	filter: alpha(opacity = 70);
	-moz-opacity: 0.6;
	opacity: 0.6;
}
</style>
	</head>

	<body id="dt_example">
		<div id="container">

			<h1>
				<a href="javascript:void(0)"
					onclick="showlightbox('/FileBackup/pages/newshare.jsp')" id="link">New
					shared folder</a>
			</h1>
			<div id="dynamic">
				<table cellpadding="0" cellspacing="0" border="0" class="display"
					id="example">
					<thead>
						<tr>
							<th width="60%">
								name
							</th>
							<th width="40%">
								kind
							</th>
							<th>

							</th>
							<th>

							</th>
						</tr>
					</thead>
					<tbody>

					</tbody>
					<tfoot>
						<tr>
							<th>
								name
							</th>
							<th>
								kind
							</th>
						</tr>
					</tfoot>
				</table>
			</div>
			<div class="spacer"></div>
		</div>


		<div id="lightbox-bg"></div>
		<div id="lightbox-content">
			<iframe id="lightbox-iframe" width="100%" frameborder="0"
				scrolling="no" src="about:blank" height="100%"></iframe>
			<p>
				<a href="javascript:void(0)" onclick="closelightbox()">关闭</a>
			</p>
		</div>



	</body>
</html>
